home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-14 | 1.7 KB | 64 lines | [TEXT/MPS ] |
- /* _________________________________________________________________________________________________________ //
- Copyright © 1992 Apple Computer, Inc. All rights reserved.
- Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
- Originator: Kent Sandvik
- Date: Friday, July 10, 1992 10:14:27
- Revision comments are at the end of this file.
- ---
- TTracer is an example of a stack/heap based tracing class, which could be
- used for tracing memory leaks and keeping track of created objects
- Tracer.h contains the header file information for the initial class construction.
- _________________________________________________________________________________________________________ */
-
- // Declare label for this header file
- #ifndef _TRACER_
- #define _TRACER_
-
- #ifndef _DTSCPLUSLIBRARY_
- #include "DTSCPlusLibrary.h"
- #endif
-
- // Toolbox Include Files
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
-
- #include <stdlib.h>
-
- // make use of the ANSI __FILE__ and __LINE__ macros
- #define TRACEPOINT __FILE__,__LINE__
-
-
- // _________________________________________________________________________________________________________ //
- // Class Interface
- class TTracer
- {
- public:
- // CONSTRUCTORS & DESTRUCTORS
- TTracer(const char* className,
- const char* file = 0,
- int line = 0);
- virtual~ TTracer();
-
- private:
- // FIELDS
- const char* fLabel;
- const char* fFile;
- int fLine;
- static int fReferenceCount; // keep track of how many TTracers we construct
- };
-
-
- #endif
-
- // _________________________________________________________________________________________________________ //
-
-
- /* Change History (most recent last):
- No Init. Date Comment
- 1 khs 7/10/92 New file
- */
-
-
-